package com.meedoll.manager.std.client.mainpanel;

import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.MenuBar;
import com.google.gwt.user.client.ui.MenuItem;
import com.google.gwt.user.client.ui.MenuItemSeparator;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.TabPanel;

public class MainPanelUI extends PopupPanel {

	public MainPanelUI() {
		super(true);
		setSize("1024px", "768px");
		
		Grid grid = new Grid(2, 1);
		setWidget(grid);
		grid.setSize("100%", "100%");
		
		MenuBar menuBar = new MenuBar(false);
	grid.setWidget(0, 0, menuBar);
		
		MenuItem menuItem = new MenuItem("业务录入", false, (Command) null);
		menuBar.addItem(menuItem);
		
		MenuItemSeparator separator = new MenuItemSeparator();
		menuBar.addSeparator(separator);
		
		MenuItem menuItem_1 = new MenuItem("经营历程", false, (Command) null);
		menuBar.addItem(menuItem_1);
		
		MenuItemSeparator separator_1 = new MenuItemSeparator();
		menuBar.addSeparator(separator_1);
		
		MenuItem menuItem_2 = new MenuItem("库存状况", false, (Command) null);
		menuBar.addItem(menuItem_2);
		
		MenuItemSeparator separator_2 = new MenuItemSeparator();
		menuBar.addSeparator(separator_2);
		
		MenuItem menuItem_3 = new MenuItem("现金银行", false, (Command) null);
		menuBar.addItem(menuItem_3);
		
		MenuItemSeparator separator_3 = new MenuItemSeparator();
		menuBar.addSeparator(separator_3);
		
		MenuItem menuItem_4 = new MenuItem("应收应付", false, (Command) null);
		menuBar.addItem(menuItem_4);
		
		MenuItemSeparator separator_4 = new MenuItemSeparator();
		menuBar.addSeparator(separator_4);
		
		MenuItem menuItem_5 = new MenuItem("销售统计", false, (Command) null);
		menuBar.addItem(menuItem_5);
		
		MenuItemSeparator separator_5 = new MenuItemSeparator();
		menuBar.addSeparator(separator_5);
		
		MenuItem menuItem_6 = new MenuItem("物价管理", false, (Command) null);
		menuBar.addItem(menuItem_6);
		
		MenuItemSeparator separator_6 = new MenuItemSeparator();
		menuBar.addSeparator(separator_6);
		
		MenuItem menuItem_7 = new MenuItem("价格跟踪", false, (Command) null);
		menuBar.addItem(menuItem_7);
		
		MenuItemSeparator separator_7 = new MenuItemSeparator();
		menuBar.addSeparator(separator_7);
		
		MenuItem menuItem_8 = new MenuItem("生产模块", false, (Command) null);
		menuBar.addItem(menuItem_8);
		
		MenuItemSeparator separator_8 = new MenuItemSeparator();
		menuBar.addSeparator(separator_8);
		
		MenuItem menuItem_9 = new MenuItem("期初建帐", false, (Command) null);
		menuBar.addItem(menuItem_9);
		
		MenuItemSeparator separator_9 = new MenuItemSeparator();
		menuBar.addSeparator(separator_9);
		
		MenuItem menuItem_10 = new MenuItem("帮助", false, (Command) null);
		menuBar.addItem(menuItem_10);
		
		MenuItemSeparator separator_10 = new MenuItemSeparator();
		menuBar.addSeparator(separator_10);
		
		MenuItem menuItem_11 = new MenuItem("退出系统", false, (Command) null);
		menuBar.addItem(menuItem_11);
		
		TabPanel daohangTab = new TabPanel();
		//TabLayoutPanel daohangTab = new TabLayoutPanel(1.5, Unit.EM);
		daohangTab.setAnimationEnabled(true);
		daohangTab.setSize("100%", "100%");
		grid.setWidget(1, 0, daohangTab);
		
		TabPanel tabPanel_1 = new TabPanel();
		//TabLayoutPanel tabPanel_1 = new TabLayoutPanel(1.5, Unit.EM);
		daohangTab.add(tabPanel_1, "导航图", false);
		tabPanel_1.setSize("100%", "435px");
		
		daohangTab.selectTab(0);
		tabPanel_1.selectTab(0);
		//////////////////////////销售管理
		Grid grid_xiaoshou = new Grid(2, 3);
		grid_xiaoshou.setBorderWidth(0);
		tabPanel_1.add(grid_xiaoshou, "销售管理", false);
		grid_xiaoshou.setSize("100%", "409px");
		
		Button button_3 = new Button("仓库");
		button_3.setText("仓库");
		grid_xiaoshou.setWidget(1, 2, button_3);
		grid_xiaoshou.getCellFormatter().setHorizontalAlignment(1, 2, HasHorizontalAlignment.ALIGN_CENTER);
		/////////////////库存管理
		Grid grid_kucun = new Grid(5, 5);
		grid_kucun.setBorderWidth(0);
		tabPanel_1.add(grid_kucun, "库存管理", false);
		grid_kucun.setSize("100%", "409px");
		
		Button button_6 = new Button("报溢单");
		button_6.setText("报溢单");
		grid_kucun.setWidget(1, 1, button_6);
		
		Button button_7 = new Button("报损单");
		button_7.setText("报损单");
		grid_kucun.setWidget(1, 2, button_7);
		
		Button button_12 = new Button("商品拆装");
		button_12.setText("商品拆装");
		grid_kucun.setWidget(1, 3, button_12);
		
		Button button_8 = new Button("同价调拨");
		button_8.setText("同价调拨");
		grid_kucun.setWidget(2, 1, button_8);
		
		Button button_9 = new Button("变价调拨");
		button_9.setText("变价调拨");
		grid_kucun.setWidget(2, 2, button_9);
		
		Button button_13 = new Button("成本调价");
		button_13.setText("成本调价");
		grid_kucun.setWidget(2, 3, button_13);
		grid_kucun.getCellFormatter().setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_CENTER);
		grid_kucun.getCellFormatter().setHorizontalAlignment(2, 1, HasHorizontalAlignment.ALIGN_CENTER);
		grid_kucun.getCellFormatter().setHorizontalAlignment(1, 2, HasHorizontalAlignment.ALIGN_CENTER);
		grid_kucun.getCellFormatter().setHorizontalAlignment(2, 2, HasHorizontalAlignment.ALIGN_CENTER);
		grid_kucun.getCellFormatter().setHorizontalAlignment(1, 3, HasHorizontalAlignment.ALIGN_CENTER);
		grid_kucun.getCellFormatter().setHorizontalAlignment(2, 3, HasHorizontalAlignment.ALIGN_CENTER);
		
		Grid grid_qianliu = new Grid(4, 8);
		grid_qianliu.setBorderWidth(0);
		tabPanel_1.add(grid_qianliu, "钱流管理", false);
		grid_qianliu.setSize("100%", "409px");
		
		Button button_14 = new Button("付款单");
		button_14.setText("付款单");
		grid_qianliu.setWidget(1, 1, button_14);
		
		Button button_15 = new Button("收款单");
		button_15.setText("收款单");
		grid_qianliu.setWidget(1, 4, button_15);
		
		Button button_16 = new Button("其它收入");
		button_16.setText("其它收入");
		grid_qianliu.setWidget(1, 7, button_16);
		
		Button button_17 = new Button("现金费用");
		button_17.setText("现金费用");
		grid_qianliu.setWidget(3, 2, button_17);
		
		Button button_18 = new Button("一般费用");
		button_18.setText("一般费用");
		grid_qianliu.setWidget(3, 5, button_18);
		grid_qianliu.getCellFormatter().setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_CENTER);
		grid_qianliu.getCellFormatter().setHorizontalAlignment(1, 4, HasHorizontalAlignment.ALIGN_CENTER);
		grid_qianliu.getCellFormatter().setHorizontalAlignment(1, 7, HasHorizontalAlignment.ALIGN_CENTER);
		grid_qianliu.getCellFormatter().setHorizontalAlignment(3, 5, HasHorizontalAlignment.ALIGN_CENTER);
		grid_qianliu.getCellFormatter().setHorizontalAlignment(3, 2, HasHorizontalAlignment.ALIGN_CENTER);
		
		Grid grid_system = new Grid(4, 4);
		grid_system.setBorderWidth(0);
		tabPanel_1.add(grid_system, "系统维护", false);
		grid_system.setSize("100%", "409px");
		
		Button button_19 = new Button("用户配置");
		button_19.setText("用户配置");
		grid_system.setWidget(1, 1, button_19);
		
		Button button_20 = new Button("口令权限");
		button_20.setText("口令权限");
		grid_system.setWidget(1, 2, button_20);
		
		Button button_21 = new Button("数据备份");
		button_21.setText("数据备份");
		grid_system.setWidget(2, 1, button_21);
		
		Button button_22 = new Button("数据恢复");
		button_22.setText("数据恢复");
		grid_system.setWidget(2, 2, button_22);
		grid_system.getCellFormatter().setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_CENTER);
		grid_system.getCellFormatter().setHorizontalAlignment(1, 2, HasHorizontalAlignment.ALIGN_CENTER);
		grid_system.getCellFormatter().setHorizontalAlignment(2, 1, HasHorizontalAlignment.ALIGN_CENTER);
		grid_system.getCellFormatter().setHorizontalAlignment(2, 2, HasHorizontalAlignment.ALIGN_CENTER);
		
	
	
	}
}
